package edu.zut.main.thread;

public class ThreadDemo {
    public static void main(String[] args) {
        System.out.println("main线程开始执行");
        //将耗时任务单独作为一个子线程
        Thread thread = new Thread(() -> {
            for (int i = 0; i < 100000; i++) {
                System.out.println("今天九月一");
            }
        });
        //让子线程进入就绪状态
        thread.start();
        System.out.println("main线程结束执行");
    }
}
